cd /opt
wget "http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.2/zabbix-2.2.2.tar.gz?r=http%3A%2F%2Fwww.zabbix.com%2Fdownload.php&ts=1395217586&use_mirror=jaist"

tar xzf zabbix-2.2.2.tar.gz
cd zabbix-2.2.2
./configure --enable-agent  --prefix=/usr/local/zabbix
make -j 4
make install
groupadd zabbix
useradd -g zabbix zabbix
sed -i "s/Server=127.0.0.1/Server=60.191.141.157/" /usr/local/zabbix/etc/zabbix_agentd.conf
sed -i "s/Hostname=Zabbix server//" /usr/local/zabbix/etc/zabbix_agentd.conf
echo "ListenPort=30005" >> /usr/local/zabbix/etc/zabbix_agentd.conf
/usr/local/zabbix/sbin/zabbix_agentd
netstat -lntp
echo "/usr/local/zabbix/sbin/zabbix_agentd" >>/etc/rc.local